﻿//获取当前选项卡
function GetCurrentTabName() {
    var objTemp = $('#divMain').tabs('getSelected').find("iframe");
    if (typeof (objTemp) == "undefined") {
        objTemp = $('#divMain').tabs('getSelected').find("IFRAME");
    }

    return $(objTemp).attr("name");
}

//调用tab下iframe中方法
function ProcessMethod(methoName) {
    var strId = GetCurrentTabName();

    var strMethod = "window.frames[" + strId + "]." + methoName + "()";
    eval(strMethod);
}

//获取所有tabs选项中ifrm的名称
function GetAllTabsName() {
    var arrNames = [];
    $("iframe").each(function (index) {
        var strId = $(this).attr("name");
        arrNames.push(strid);
    });
    return arrNames;
}